home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 11590 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.8 KB  |  66 lines

  1. Path: news.simi.is!newsadm
  2. From: Bj÷rn Helgason <bjornhp@simi.is>
  3. Newsgroups: comp.lang.misc,comp.lang.c,comp.lang.pl1,comp.lang.apl
  4. Subject: Re: GOTO controversy
  5. Date: Mon, 25 Mar 1996 07:50:04 +0000
  6. Organization: Post and Telecom Iceland, IS-150 Reykjavik, ICELAND
  7. Message-ID: <3156502C.56D7@simi.is>
  8. References: <314FB5F5.259B@simi.is> <3151B47F.70FD@connix.com> <4iv0hl$1pg@neptune.cs.trinity.edu>
  9. NNTP-Posting-Host: simi.is
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (Win95; I)
  14.  
  15. John E. Howland wrote:
  16. > Scott Hawley (shawley@connix.com) wrote:
  17. > > What to you think? Loops without using loops?
  18.  
  19. In J the concept of "each" does away with loops alltogether.
  20.  
  21. You place all the items you want to operate on in arrays. 
  22. Character arrays, numerical arrays or boxed arrays.
  23.  
  24. You then apply all kinds of operations on these arrays.
  25.  
  26. With "each" you do not have to specify or test for beginnings
  27. or ends of anything. 
  28.  
  29. As for the developer there is no need to think about how this
  30. is actually performed in the machine.
  31.  
  32. In the past this was a burden for the machine because developers could
  33. write code so fast that the machines had a difficult time executing
  34. all that was given to them.
  35.  
  36. It is only recvently that the machines have become fast enough to 
  37. take the likes of J that lets developers write in a few statements
  38. things that used to make the machine operate on for a long time.
  39.  
  40. J does not care how many elements an array has when you write
  41.  
  42. a plus b
  43.  
  44. if you as a developer have defined 
  45.  
  46. plus=.+
  47. a=.2
  48. b=.3
  49.  
  50. with a and b as scalars or 
  51.  
  52. a=. 1234 23$i.111111
  53.  
  54. J still allows you to write 
  55.  
  56. a plus b
  57.  
  58. No loops need to be defined. 
  59.  
  60. -- 
  61. /Gosi
  62. bjornhp@simi.is Bjorn Helgason Spitalastig 4 101 Reykjavik Iceland 354 
  63. 562 5441
  64. http://www.jsoftware.com
  65.